import request from '@/utils/request'

// 查询平台新闻列表
export function platformNews(data) {
  return request({
    url: '/sys/platformNews/query',
    method: 'post',
    data: data
  })
}
//添加平台新闻
export function platformNewsAdd(data) {
  return request({
    url: '/sys/platformNews/add',
    method: 'post',
    data: data
  })
}
//删除平台新闻
export function platformNewsDel(id) {
  return request({
    url: `/sys/platformNews/delete/${id}`,
    method: 'delete',
  })
}

//查询平台新闻详情
export function platformNewsInfo(id) {
  return request({
    url: `/sys/platformNews/info/${id}`,
    method: 'get',
  })
}
//平台新闻修改状态
export function updateState(data) {
  return request({
    url: '/sys/platformNews/updateState',
    method: 'post',
    data: data
  })
}

//修改平台新闻
export function platformNewsUpload(data) {
  return request({
    url: '/sys/platformNews/update',
    method: 'post',
    data: data
  })
}
